"use strict"
/**
 * @name
 * 活动数据
 */

/**
 * @name getActive
 * @param int cid 数据类型
 * 获取活动数据
 */
exports.getActive = function () {
    let id = this.get('cid', 'int');
    let query = {
    };
    if (id != 0) {
        query = {
            "cid": id
        };
    }
    let api = '/active/getAllByType',
        data = {
            "query": query,
            "keys": ["item", "s_key", "s_skin", "AType", "content", "name", "simg"],
        };
    return this.library('spirit/gzone', api, data).then(ret => {
        if (!ret) {
            return;
        }
        return ret;
    })
}
